gdk: Insist axis.min_value < axis.max_value
authorBenjamin Otte <otte@redhat.com>
Fri, 9 Sep 2016 12:49:12 +0000 (14:49 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 16 Oct 2016 16:17:21 +0000 (18:17 +0200)
Remove fallback code that would substitute screen size otherwise.

gdk/gdkdevice.c

index 9f0c6e23d79af59b6a38772a0d1157b9304f3da9..e489d5a95a09a238408fc1e7fb1547def8529da5 100644 (file)
@@ -1708,21 +1708,8 @@ _gdk_device_translate_window_coord (GdkDevice *device,
   device_width = axis_info_x->max_value - axis_info_x->min_value;
   device_height = axis_info_y->max_value - axis_info_y->min_value;
 
-  if (device_width > 0)
-    x_min = axis_info_x->min_value;
-  else
-    {
-      device_width = gdk_screen_get_width (gdk_window_get_screen (window));
-      x_min = 0;
-    }
-
-  if (device_height > 0)
-    y_min = axis_info_y->min_value;
-  else
-    {
-      device_height = gdk_screen_get_height (gdk_window_get_screen (window));
-      y_min = 0;
-    }
+  x_min = axis_info_x->min_value;
+  y_min = axis_info_y->min_value;
 
   window_width = gdk_window_get_width (window);
   window_height = gdk_window_get_height (window);